import 'dart:convert';

import 'package:flutter/services.dart';
import 'package:wallet_home/file_r.dart';
import 'package:wallet_home/model/wallet_list_model.dart';
import 'package:wallet_home/widget/coins_manager.dart';
import '../widget/coins_manager.dart';

Future<List<CoinsBean>> getListData() async {
//  List<CoinsBean> walletList = List();
//  String coins = await rootBundle.loadString(FileR.filesCoin);
//  var list = json.decode(coins);
//  print("list=======>$list");
//  walletList = WalletListModel.fromMap(list).coins;
//  return walletList;
  return Future.value(CoinManager().allSelectedCoinList) ;
}

//Future<List<CoinsBean>> getAllListData() async {
//  List<CoinsBean> walletList = List();
//  String coins = await rootBundle.loadString(FileR.filesCoin);
//  var list = json.decode(coins);
//  print("list=======>$list");
//  walletList = WalletListModel.fromMap(list).coins;
//  return Future.value(walletList);
//}
//Future<Map<String, CoinsBean>> getListData() async {
//  /// 加载json初始化
//  String result = await rootBundle.loadString(FileR.filesCoin);
//  return json.decode(result);
//}
//
//List<CoinsBean> getData(){
//  Map<String,CoinsBean> response = getListData().;
//  List<CoinsBean> list = WalletListModel.fromMap(response).coins;
//  return list;
//}
